#include <level.h>
#include <stdio.h>

int main (void)
{
	level_load ("level.txt");

	LevelCell **map;
	int w, h, i, j;

	level_get (&map, &w, &h);

	for (i = 0; i < h; i++) {
		for (j = 0; j < w; j++) {
			if (map[i][j] & LEVEL_BLOCK)
				putchar ('#');
			else 
				putchar (' ');
		}
		putchar ('\n');
	}
	level_save ("level2.txt");

	level_unload ();

	return 0;
}

